<template>
  <div class="reportFormPage">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;3&nbsp;</span>
            <!--            <span class="placeholder-min text-center"> { form.totalPage }} </span>-->
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">砂浆配合比设计试验检测记录表</div>
        <div class="codeText">BGLQ05002F</div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <!-- .........................1111111111111111111111111111111......................................................... -->
      <div class="table-border">
        <table height="220px" class="top-table">
          <tbody>
            <tr>
              <td align="center" width="15%" height="25">
                <span style="width: 90px; display: inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">工程部位/用途</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="25" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>
                <span>；样品数量：</span>
                <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
                <!--                <span>；来样时间：</span>-->
                <!--                <span :class="{ 'placeholder':!form.yangpsj }">{{ form.yangpsj }}</span>-->
              </td>
            </tr>
            <tr>
              <td height="25" align="center" width="15%">
                <span style="width: 90px; display: inline-block">试验日期</span>
              </td>
               <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>

              <td align="center" style="width: 15%">
                <span style="width: 90px; display: inline-block">试验条件</span>
              </td>
              <td v-if="isPdf" width="35%">
                温度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
                ℃；湿度：
                <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span
                >%RH
              </td>
              <td v-else width="35%">
                温度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" class="height100" style="width: 15%" />℃；湿度：
                <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" class="height100" style="width: 15%" />%RH
              </td>
            </tr>
            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="660px" class="middle-table">
          <tbody>
            <tr trindex="0" height="40">
              <td width="10%" colspan="1" rowspan="4">
                设计
                <br />条件
              </td>
              <td width="20%" colspan="2">设计强度等级</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.shejqddj" @blur="passValue()" @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'" />
              </td>
              <td width="20%" colspan="2">拌制方法</td>
              <td width="30%" colspan="3">
                <el-input v-model="form.banzff" @blur="passValue()" @keydown.native="handleKeyDown($event, 0, 1)" :ref="'0_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">试配强度(MPa)</td>
              <td colspan="2">
                <el-input v-model="form.shipqd" @blur="passValue()" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'"></el-input>
              </td>
              <td colspan="2">设计稠度(mm)</td>
              <td colspan="3">
                <el-input v-model="form.shejcd" @blur="passValue()" @keydown.native="handleKeyDown($event, 1, 1)" :ref="'1_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">标准差σ</td>
              <td colspan="2">
                <el-input v-model="form.biaozc" @blur="passValue()" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'" />
              </td>
              <td colspan="2">养护方式</td>
              <td colspan="3">
                <el-input v-model="form.yanghfs" @blur="passValue()" @keydown.native="handleKeyDown($event, 2, 1)" :ref="'2_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">养护环境</td>
              <td colspan="7">
                温度:
                <el-input
                  type="text"
                  v-model="form.yanghhjwd"
                  style="border-width: 0px; width: 23%; text-align: left"
                  @blur="passValue()"
                  @keydown.native="handleKeyDown($event, 3, 0)"
                  :ref="'3_0'"
                />℃ 相对湿度:
                <el-input
                  type="text"
                  v-model="form.yanghhjsd"
                  style="border-width: 0px; width: 23%; text-align: left"
                  @blur="passValue()"
                  @keydown.native="handleKeyDown($event, 3, 1)"
                  :ref="'3_1'"
                />%
              </td>
            </tr>
            <tr trindex="0" width="100%" height="40">
              <td width="10%" colspan="1" rowspan="7">
                材料
                <br />说明
              </td>
              <td width="20%" colspan="2">水泥品牌及强度等级</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.shuinppjqddj" @blur="passValue()" @keydown.native="handleKeyDown($event, 4, 0)" :ref="'4_0'" />
              </td>
              <td width="20%" colspan="2">水泥产地</td>
              <td width="30%" colspan="3">
                <el-input v-model="form.shuincd" @blur="passValue()" @keydown.native="handleKeyDown($event, 4, 1)" :ref="'4_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">掺加料名称</td>
              <td colspan="2">
                <el-input v-model="form.chanjlmc1" @keydown.native="handleKeyDown($event, 5, 0)" :ref="'5_0'" />
              </td>
              <td colspan="2">掺加料用量</td>
              <td colspan="3">
                <el-input v-model="form.chanjlyl1" @blur="passValue()" @keydown.native="handleKeyDown($event, 5, 1)" :ref="'5_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">掺加料名称</td>
              <td colspan="2">
                <el-input v-model="form.chanjlmc2" @blur="passValue()" @keydown.native="handleKeyDown($event, 6, 0)" :ref="'6_0'" />
              </td>
              <td colspan="2">掺加料用量</td>
              <td colspan="3">
                <el-input v-model="form.chanjlyl2" @blur="passValue()" @keydown.native="handleKeyDown($event, 6, 1)" :ref="'6_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td width="20%" colspan="2">细集料产地</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.xijlcd" @blur="passValue()" @keydown.native="handleKeyDown($event, 7, 0)" :ref="'7_0'" />
              </td>
              <td width="30%" colspan="3">细集料表观密度(kg/m³)</td>
              <td width="20%" colspan="2">
                <el-input v-model="form.xijlbgmd" @blur="passValue()" @keydown.native="handleKeyDown($event, 7, 1)" :ref="'7_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">细度模数</td>
              <td colspan="2">
                <el-input v-model="form.xidms" @blur="passValue()" @keydown.native="handleKeyDown($event, 8, 0)" :ref="'8_0'" />
              </td>
              <td colspan="3">细集料类型</td>
              <td colspan="2">
                <el-input v-model="form.xijllx" @blur="passValue()" @keydown.native="handleKeyDown($event, 8, 1)" :ref="'8_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">外掺剂名称</td>
              <td colspan="2">
                <el-input v-model="form.waicjmc1" @blur="passValue()" @keydown.native="handleKeyDown($event, 9, 0)" :ref="'9_0'" />
              </td>
              <td colspan="3">外掺剂比例(%)</td>
              <td colspan="2">
                <el-input v-model="form.waicjbl1" @blur="passValue()" @keydown.native="handleKeyDown($event, 9, 1)" :ref="'9_1'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">外掺剂名称</td>
              <td colspan="2">
                <el-input v-model="form.waicjmc2" @blur="passValue()" @keydown.native="handleKeyDown($event, 10, 0)" :ref="'10_0'" />
              </td>
              <td colspan="3">外掺剂比例(%)</td>
              <td colspan="2">
                <el-input v-model="form.waicjbl2" @blur="passValue()" @keydown.native="handleKeyDown($event, 10, 1)" :ref="'10_1'" />
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <!-- .................................333333333333333............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType" />
    <bs-judge-base-edit-view ref="bsJudgeBaseEditViewRef" @submit="selectJudgeBaseEdit" :syType="syType" />
    <!-- ............................................................................第二页................................................ -->
    <div class="report-dom mt20">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">第 2 页，共 3 页</div>
        </el-col>
      </el-row>
      <!-- <div class="threeTopBox"> -->
      <div style="text-align: right; font-family: '宋体'; font-size: 14px; margin-right: 60px">续上表</div>
      <!-- </div> -->
      <!-- .................................续上表............................................... -->
      <div class="table-border">
        <table height="930px" class="top-table">
          <tbody>
            <tr trindex="0" height="40">
              <td width="40%" colspan="4">试验编号</td>
              <td width="20%" colspan="2">1</td>
              <td width="20%" colspan="2">2</td>
              <td width="20%" colspan="2">3</td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2" rowspan="8" width="10%">
                计算配合
                <br />比(kg/m³)
              </td>
              <td colspan="2">水泥</td>
              <td colspan="2">
                <el-input v-model="oneData.shuin" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 11, 0)" :ref="'11_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.shuin" @blur="computeshasb(1)" @keydown.native="handleKeyDown($event, 11, 1)" :ref="'11_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.shuin" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 11, 2)" :ref="'11_2'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1" width="10%" rowspan="2">掺加料</td>
              <td colspan="1" width="10%">
                <el-input v-model="form.chanjlmc1" @blur="passValue()" @keydown.native="handleKeyDown($event, 12, 0)" :ref="'12_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.chanjlyl1" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 12, 1)" :ref="'12_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.chanjlyl1" @blur="passValue(), computeshasb(1)" @keydown.native="handleKeyDown($event, 12, 2)" :ref="'12_2'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.chanjlyl1" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 12, 3)" :ref="'12_3'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1">
                <el-input v-model="form.chanjlmc2" @blur="passValue()" @keydown.native="handleKeyDown($event, 13, 0)" :ref="'13_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.chanjlyl2" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 13, 1)" :ref="'13_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.chanjlyl2" @blur="passValue(), computeshasb(1)" @keydown.native="handleKeyDown($event, 13, 2)" :ref="'13_2'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.chanjlyl2" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 13, 3)" :ref="'13_3'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">水</td>
              <td colspan="2">
                <el-input v-model="oneData.shui" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 14, 0)" :ref="'14_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.shui" @blur="computeshasb(1)" @keydown.native="handleKeyDown($event, 14, 1)" :ref="'14_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.shui" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 14, 2)" :ref="'14_2'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">砂</td>
              <td colspan="2">
                <el-input v-model="oneData.sha" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 15, 0)" :ref="'15_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.sha" @blur="computeshasb(1)" @keydown.native="handleKeyDown($event, 15, 1)" :ref="'15_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.sha" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 15, 2)" :ref="'15_2'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1" rowspan="2">外加剂</td>
              <td colspan="1">
                <el-input v-model="form.waicjmc1" @blur="passValue()" @keydown.native="handleKeyDown($event, 16, 0)" :ref="'16_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.waijjyl1" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 16, 1)" :ref="'16_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.waijjyl1" @blur="passValue(), computeshasb(1)" @keydown.native="handleKeyDown($event, 16, 2)" :ref="'16_2'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.waijjyl1" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 16, 3)" :ref="'16_3'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1">
                <el-input v-model="form.waicjmc2" @blur="passValue()" @keydown.native="handleKeyDown($event, 17, 0)" :ref="'17_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.waijjyl2" @blur="computeshasb(0)" @keydown.native="handleKeyDown($event, 17, 1)" :ref="'17_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.waijjyl2" @blur="passValue(), computeshasb(1)" @keydown.native="handleKeyDown($event, 17, 2)" :ref="'17_2'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.waijjyl2" @blur="computeshasb(2)" @keydown.native="handleKeyDown($event, 17, 3)" :ref="'17_3'" />
              </td>
            </tr>
            <tr trindex="1" height="80">
              <!-- <td colspan="2">水泥:砂:水</td> -->
              <td colspan="2">重量配合比</td>
              <td colspan="2">
                {{ form.detailList[0].shuinssb }}
              </td>
              <td colspan="2">
                {{ form.detailList[1].shuinssb }}
              </td>
              <td colspan="2">
                {{ form.detailList[2].shuinssb }}
              </td>
            </tr>

            <tr trindex="1" height="40">
              <td colspan="2" rowspan="7" width="10%">
                <div>试</div>
                <div>拌</div>
                <el-input v-model="form.shiysyl" @change="handleStyl" style="height: 25px; width: 100%; margin: 4px 0" />
                <div>升</div>
                <div>用</div>
                <div>量</div>
                <div>(kg/m³)</div>
                <!--                <br />升用量(kg/m³)-->
              </td>
              <td colspan="2">水泥</td>
              <td colspan="2">
                <el-input v-model="oneData.shuinl" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.shuinl" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.shuinl" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1" width="10%" rowspan="2">掺加料</td>
              <td colspan="1" width="10%">
                <el-input v-model="form.chanjlmc1" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.chanjlyl1l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.chanjlyl1l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.chanjlyl1l" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1">
                <el-input v-model="form.chanjlmc2" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.chanjlyl2l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.chanjlyl2l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.chanjlyl2l" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">水</td>
              <td colspan="2">
                <el-input v-model="oneData.shuil" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.shuil" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.shuil" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="2">砂</td>
              <td colspan="2">
                <el-input v-model="oneData.shal" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.shal" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.shal" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1" rowspan="2">外加剂</td>
              <td colspan="1">
                <el-input v-model="form.waicjmc1" disabled @blur="passValue()" />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.waijjyl1l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.waijjyl1l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.waijjyl1l" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="1">
                <el-input v-model="form.waicjmc2" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="oneData.waijjyl2l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.waijjyl2l" disabled />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.waijjyl2l" disabled />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="4">稠度(mm)</td>
              <td colspan="2">
                <el-input v-model="oneData.choud" @keydown.native="handleKeyDown($event, 18, 0)" :ref="'18_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.choud" @keydown.native="handleKeyDown($event, 18, 1)" :ref="'18_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.choud" @keydown.native="handleKeyDown($event, 18, 2)" :ref="'18_2'" />
              </td>
            </tr>
            <tr trindex="1" height="40">
              <td colspan="4">表观密度(kg/m³)</td>
              <td colspan="2">
                <el-input v-model="oneData.biaogmd" @keydown.native="handleKeyDown($event, 19, 0)" :ref="'19_0'" />
              </td>
              <td colspan="2">
                <el-input v-model="twoData.biaogmd" @keydown.native="handleKeyDown($event, 19, 1)" :ref="'19_1'" />
              </td>
              <td colspan="2">
                <el-input v-model="threeData.biaogmd" @keydown.native="handleKeyDown($event, 19, 2)" :ref="'19_2'" />
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <!-- .........................................................................第三页........................................................ -->
    <div class="report-dom mt20">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">第 3 页，共 3 页</div>
        </el-col>
      </el-row>
      <!-- <div class="threeTopBox"> -->
      <div style="text-align: right; font-family: '宋体'; font-size: 14px; margin-right: 60px">续上表</div>
      <!-- </div> -->
      <!-- .................................续上表............................................... -->
      <div class="table-border">
        <table height="870px" class="top-table">
          <tbody>
            <tr trindex="0" height="40">
              <td width="25%" colspan="3">成型日期</td>
              <td width="25%" colspan="3">
                <el-date-picker class="syrqStyle hide-icon" v-model="oneData.chengxrq" style="width: 100%" />
              </td>
              <td width="25%" colspan="3">
                <el-date-picker class="syrqStyle hide-icon" value-format="yyyy-MM-dd" format="yyyy-MM-dd" v-model="twoData.chengxrq" style="width: 100%" @change="passValue" />
              </td>
              <td width="25%" colspan="3">
                <el-date-picker class="syrqStyle hide-icon" v-model="threeData.chengxrq" style="width: 100%" />
              </td>
            </tr>
            <tr trindex="0" height="40">
              <td width="25%" colspan="3">试件尺寸</td>
              <td width="25%" colspan="3">70.7x70.7x70.7</td>
              <td width="25%" colspan="3">70.7x70.7x70.7</td>
              <td width="25%" colspan="3">70.7x70.7x70.7</td>
            </tr>

            <tr trindex="0" height="40">
              <td width="8%" colspan="1">测强</td>
              <td width="17%" colspan="2">试验日期</td>
              <td width="8%" colspan="1">
                荷载
                <br />(kN)
              </td>
              <td width="8%" colspan="1">
                强度
                <br />(MPa)
              </td>
              <td width="8%" colspan="1">
                结果
                <br />(MPa)
              </td>
              <td width="8%" colspan="1">
                荷载
                <br />(kN)
              </td>
              <td width="8%" colspan="1">
                强度
                <br />(MPa)
              </td>
              <td width="8%" colspan="1">
                结果
                <br />(MPa)
              </td>
              <td width="8%" colspan="1">
                荷载
                <br />(kN)
              </td>
              <td width="8%" colspan="1">
                强度
                <br />(MPa)
              </td>
              <td width="8%" colspan="1">
                结果
                <br />(MPa)
              </td>
            </tr>

            <tr trindex="0" height="40">
              <td width="8%" colspan="1" rowspan="3">
                3
                <br />天 <br />强 <br />度
              </td>
              <td width="17%" colspan="2" rowspan="3">
                <el-date-picker class="syrqStyle hide-icon" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="passValue()" v-model="form.ssyrq" style="width: 100%" />
              </td>
              <td width="8%" colspan="1">
                <el-input v-model="oneData.shz1" @blur="computeyq(0, 1)" @keydown.native="handleKeyDown($event, 20, 0)" :ref="'20_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["sqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ form.detailList[0].spjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.shz1" @blur="computeyq(1, 1)" @keydown.native="handleKeyDown($event, 20, 1)" :ref="'20_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["sqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ form.detailList[1].spjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.shz1" @blur="computeyq(2, 1)" @keydown.native="handleKeyDown($event, 20, 2)" :ref="'20_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["sqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ form.detailList[2].spjqd1 }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.shz2" @blur="computeyq(0, 2)" @keydown.native="handleKeyDown($event, 21, 0)" :ref="'21_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["sqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.shz2" @blur="computeyq(1, 2)" @keydown.native="handleKeyDown($event, 21, 1)" :ref="'21_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["sqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.shz2" @blur="computeyq(2, 2)" @keydown.native="handleKeyDown($event, 21, 2)" :ref="'21_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["sqd2"] }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.shz3" @blur="computeyq(0, 3)" @keydown.native="handleKeyDown($event, 22, 0)" :ref="'22_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["sqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.shz3" @blur="computeyq(1, 3)" @keydown.native="handleKeyDown($event, 22, 1)" :ref="'22_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["sqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.shz3" @blur="computeyq(2, 3)" @keydown.native="handleKeyDown($event, 22, 2)" :ref="'22_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["sqd3"] }}</td>
            </tr>

            <tr trindex="0" height="40">
              <td width="8%" colspan="1" rowspan="3">
                7
                <br />天 <br />强 <br />度
              </td>
              <td width="17%" colspan="2" rowspan="3">
                <el-date-picker class="syrqStyle hide-icon" v-model="form.qsyrq" style="width: 100%" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="passValue()" />
              </td>
              <td width="8%" colspan="1">
                <el-input v-model="oneData.qhz1" @blur="computeyq7(0, 1)" @keydown.native="handleKeyDown($event, 23, 0)" :ref="'23_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["qqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ oneData.qpjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.qhz1" @blur="computeyq7(1, 1)" @keydown.native="handleKeyDown($event, 23, 1)" :ref="'23_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["qqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ twoData.qpjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.qhz1" @blur="computeyq7(2, 1)" @keydown.native="handleKeyDown($event, 23, 2)" :ref="'23_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["qqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ threeData.qpjqd1 }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.qhz2" @blur="computeyq7(0, 2)" @keydown.native="handleKeyDown($event, 24, 0)" :ref="'24_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["qqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.qhz2" @blur="computeyq7(1, 2)" @keydown.native="handleKeyDown($event, 24, 1)" :ref="'24_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["qqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.qhz2" @blur="computeyq7(2, 2)" @keydown.native="handleKeyDown($event, 24, 2)" :ref="'24_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["qqd2"] }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.qhz3" @blur="computeyq7(0, 3)" @keydown.native="handleKeyDown($event, 25, 0)" :ref="'25_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["qqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.qhz3" @blur="computeyq7(1, 3)" @keydown.native="handleKeyDown($event, 25, 1)" :ref="'25_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["qqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.qhz3" @blur="computeyq7(2, 3)" @keydown.native="handleKeyDown($event, 25, 2)" :ref="'25_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["qqd3"] }}</td>
            </tr>

            <tr trindex="0" height="40">
              <td width="8%" colspan="1" rowspan="3">
                28
                <br />天 <br />强 <br />度
              </td>
              <td width="17%" colspan="2" rowspan="3">
                <el-date-picker class="syrqStyle hide-icon" v-model="form.esyrq" style="width: 100%" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="passValue()" />
              </td>
              <td width="8%" colspan="1">
                <el-input v-model="oneData.ehz1" @blur="computeyq28(0, 1)" @keydown.native="handleKeyDown($event, 26, 0)" :ref="'26_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["eqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ oneData.epjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.ehz1" @blur="computeyq28(1, 1)" @keydown.native="handleKeyDown($event, 26, 1)" :ref="'26_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["eqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ twoData.epjqd1 }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.ehz1" @blur="computeyq28(2, 1)" @keydown.native="handleKeyDown($event, 26, 2)" :ref="'26_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["eqd1"] }}</td>
              <td width="8%" colspan="1" rowspan="3">{{ threeData.epjqd1 }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.ehz2" @blur="computeyq28(0, 2)" @keydown.native="handleKeyDown($event, 27, 0)" :ref="'27_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["eqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.ehz2" @blur="computeyq28(1, 2)" @keydown.native="handleKeyDown($event, 27, 1)" :ref="'27_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["eqd2"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.ehz2" @blur="computeyq28(2, 2)" @keydown.native="handleKeyDown($event, 27, 2)" :ref="'27_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["eqd2"] }}</td>
            </tr>
            <tr trindex="0" height="40">
              <td width="8%" colspan="1">
                <el-input v-model="oneData.ehz3" @blur="computeyq28(0, 3)" @keydown.native="handleKeyDown($event, 28, 0)" :ref="'28_0'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[0]["eqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="twoData.ehz3" @blur="computeyq28(1, 3)" @keydown.native="handleKeyDown($event, 28, 1)" :ref="'28_1'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[1]["eqd3"] }}</td>
              <td width="8%" colspan="1">
                <el-input v-model="threeData.ehz3" @blur="computeyq28(2, 3)" @keydown.native="handleKeyDown($event, 28, 2)" :ref="'28_2'" />
              </td>
              <td width="8%" colspan="1">{{ form.detailList[2]["eqd3"] }}</td>
            </tr>
          </tbody>
        </table>
        <table height="80px" class="bottom-table">
          <tr>
            <td style="border-top-width: 1px">
              <el-input type="textarea" :rows="2" v-model="fjsm" />
            </td>
          </tr>
        </table>
      </div>
      <!-- ...............................续上表..333333333333333............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">记录：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">复核：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block; margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>

<script>
import { getSjPhbsjsyjcjlBsInfo } from "@/api/reportsj/sjPhbsjsyjcjlBsInfo";
import { computeKgNums } from "@/api/reportsnhnt/snhntPhbsjsyjcjlBsInfo";

import decimal from "@/utils/big-decimal";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import Bus from "@/utils/bus";
import { emptyConvert, handleFocus, handleKeyDown } from "@/views/reportForms/utils";
import { computeBiQualification } from "@/api/sycs/biQualification";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView";
import BsJudgeBaseEditView from "@/views/sycs/bsJudgeBase/BsJudgeBaseEditView";

export default {
  name: "bhw",
  components: {
    BsInstrumentView,
    BsJiancyjView,
    BsJudgeBaseView,
    BsJudgeBaseEditView
  },
  methods: {
    //计算水泥砂水比
    computeshasb(i) {
      if (
        (this.form.detailList[i].shuin && this.form.detailList[i].sha && this.form.detailList[i].shui) ||
        this.form.detailList[i].chanjlyl1 ||
        this.form.detailList[i].chanjlyl2 ||
        this.form.detailList[i].waijjyl1 ||
        this.form.detailList[i].waijjyl2
      ) {
        let a1 = decimal.divide(this.form.detailList[i].chanjlyl1 || 0, this.form.detailList[i].shuin, 2); //掺加料1
        let a2 = decimal.divide(this.form.detailList[i].chanjlyl2 || 0, this.form.detailList[i].shuin, 2); //掺加料2
        let a3 = decimal.divide(this.form.detailList[i].shui, this.form.detailList[i].shuin, 2); //水
        let a4 = decimal.divide(this.form.detailList[i].sha, this.form.detailList[i].shuin, 2); //砂
        let a5 = decimal.divide(this.form.detailList[i].waijjyl1 || 0, this.form.detailList[i].shuin, 3); //外加剂1
        let a6 = decimal.divide(this.form.detailList[i].waijjyl2 || 0, this.form.detailList[i].shuin, 3); //外加剂2

        this.form.detailList[i].shuinssb = "1" + ":" + a1 + ":" + a2 + ":" + a3 + ":" + a4 + ":" + a5 + ":" + a6;
        if (i == 1 && this.form.detailList[1].shuinssb) {
          this.form.shuinssb = this.form.detailList[1].shuinssb;
          this.form.shuin = this.form.detailList[1].shuin;
          this.form.shui = this.form.detailList[1].shui;
          this.form.sha = this.form.detailList[1].sha;
          this.form.waijjyl1 = this.form.detailList[1].waijjyl1;
          this.form.waijjyl2 = this.form.detailList[1].waijjyl2;
          Bus.$emit("setphbbgform", this.form);
        }
        // 调接口计算下半部分
        this.getStyl();
      }
    },
    handleStyl(val) {
      this.getStyl();
    },
    getStyl() {
      let params = [{}, {}, {}];
      if (this.form.shiysyl != null) {
        for (let i = 0; i < 3; i++) {
          let item = this.form.detailList[i];
          params[i].phb = [
            this.form.detailList[i].shuin || 0,
            this.form.detailList[i].chanjlyl1 || 0,
            this.form.detailList[i].chanjlyl2 || 0,
            this.form.detailList[i].shui || 0,
            this.form.detailList[i].sha || 0,
            this.form.detailList[i].waijjyl1 || 0,
            this.form.detailList[i].waijjyl2 || 0
          ];
          // item.shuinssb?.length ? item.shuinssb?.split(":") : [];
          params[i].sum = this.form.shiysyl;
          params[i].zhuanHuanLv = 2.1;
        }

        const data = JSON.parse(JSON.stringify(params));
        computeKgNums(data).then((res) => {
          let keyObj = {
            0: "oneData",
            1: "twoData",
            2: "threeData"
          };
          if (res.data?.length) {
            for (let a = 0; a < 3; a++) {
              let item = res.data[a].computeResult;
              console.log(item);
              this[keyObj[a]].shuinl = item[0] == 0 ? "-" : item[0] || null;
              this[keyObj[a]].chanjlyl1l = item[1] == 0 ? "-" : item[1] || null;
              this[keyObj[a]].chanjlyl2l = item[2] == 0 ? "-" : item[2] || null;
              this[keyObj[a]].shuil = item[3] == 0 ? "-" : item[3] || null;
              this[keyObj[a]].shal = item[4] == 0 ? "-" : item[4] || null;
              this[keyObj[a]].waijjyl1l = item[5] == "0" ? "-" : item[5] || null;
              this[keyObj[a]].waijjyl2l = item[6] == 0 ? "-" : item[6] || null;
            }
          }
        });
      }
    },
    // 传值给报告页面；
    passValue() {
      if (this.form.yanghhjwd || this.form.yanghhjsd) {
        this.form.yanghhj = "温度：" + this.form.yanghhjwd + " 湿度：" + this.form.yanghhjsd;
      }
      this.form.chengxrq = this.form.detailList[1].chengxrq;
      Bus.$emit("setphbbgform", this.form);
      this.computeshasb(1);
      this.computeyq(1, 1);
      this.computeyq7(1, 1);
      this.computeyq28(1, 1);
    },
    // 计算3天压强
    computeyq(a, b) {
      if (this.form.detailList[a]["shz" + b]) {
        this.form.detailList[a]["sqd" + b] = this.getyaq(this.form.detailList[a]["shz" + b]);
      } else {
        this.form.detailList[a]["sqd" + b] = null;
      }
      this.computeyqpj3(a);
    },

    // 计算7天压强
    computeyq7(a, b) {
      if (this.form.detailList[a]["qhz" + b]) {
        this.form.detailList[a]["qqd" + b] = this.getyaq(this.form.detailList[a]["qhz" + b]);
      } else {
        this.form.detailList[a]["qqd" + b] = null;
      }
      this.computeyqpj7(a);
    },
    // 计算28天压强
    computeyq28(a, b) {
      if (this.form.detailList[a]["ehz" + b]) {
        this.form.detailList[a]["eqd" + b] = this.getyaq(this.form.detailList[a]["ehz" + b]);
      } else {
        this.form.detailList[a]["eqd" + b] = null;
      }
      this.computeyqpj28(a);
    },

    //3天平均压强
    computeyqpj3(a) {
      for (let i = 0; i < 3; i++) {
        if (this.form.detailList[i]["sqd1"] && this.form.detailList[i]["sqd2"] && this.form.detailList[i]["sqd3"]) {
          this.form.detailList[i]["spjqd1"] =
            this.form.detailList[i]["spjqd2"] =
            this.form.detailList[i]["spjqd3"] =
              decimal.divide(decimal.add(this.form.detailList[i].sqd1, decimal.add(this.form.detailList[i].sqd2, this.form.detailList[i].sqd3)), 3, 1);
          if (a == 1) {
            this.form.shz1 = this.form.detailList[1]["shz1"];
            this.form.shz2 = this.form.detailList[1]["shz2"];
            this.form.shz3 = this.form.detailList[1]["shz3"];
            this.form.sqd1 = this.form.detailList[1]["sqd1"];
            this.form.sqd2 = this.form.detailList[1]["sqd2"];
            this.form.sqd3 = this.form.detailList[1]["sqd3"];
            this.form.spjqd = this.form.detailList[1]["spjqd1"];
          }
        } else {
          this.form.detailList[i]["spjqd1"] = null;
        }
        Bus.$emit("setphbbgform", this.form);
      }
    },
    //7天平均压强
    computeyqpj7(a) {
      for (let i = 0; i < 3; i++) {
        if (this.form.detailList[i]["qqd1"] && this.form.detailList[i]["qqd2"] && this.form.detailList[i]["qqd3"]) {
          this.form.detailList[i]["qpjqd1"] =
            this.form.detailList[i]["qpjqd2"] =
            this.form.detailList[i]["qpjqd3"] =
              decimal.divide(decimal.add(this.form.detailList[i].qqd1, decimal.add(this.form.detailList[i].qqd2, this.form.detailList[i].qqd3)), 3, 1);
          if (a == 1) {
            this.form.qhz1 = this.form.detailList[1]["qhz1"];
            this.form.qhz2 = this.form.detailList[1]["qhz2"];
            this.form.qhz3 = this.form.detailList[1]["qhz3"];
            this.form.qqd1 = this.form.detailList[1]["qqd1"];
            this.form.qqd2 = this.form.detailList[1]["qqd2"];
            this.form.qqd3 = this.form.detailList[1]["qqd3"];
            this.form.qpjqd = this.form.detailList[1]["qpjqd1"];
          }
        } else {
          this.form.detailList[i]["qpjqd1"] = null;
        }
        Bus.$emit("setphbbgform", this.form);
      }
    },

    //28天平均压强
    computeyqpj28(a) {
      for (let i = 0; i < 3; i++) {
        if (this.form.detailList[i]["eqd1"] && this.form.detailList[i]["eqd2"] && this.form.detailList[i]["eqd3"]) {
          this.form.detailList[i]["epjqd1"] =
            this.form.detailList[i]["epjqd2"] =
            this.form.detailList[i]["epjqd3"] =
              decimal.divide(decimal.add(this.form.detailList[i].eqd1, decimal.add(this.form.detailList[i].eqd2, this.form.detailList[i].eqd3)), 3, 1);
          if (a == 1) {
            this.form.ehz1 = this.form.detailList[1]["ehz1"];
            this.form.ehz2 = this.form.detailList[1]["ehz2"];
            this.form.ehz3 = this.form.detailList[1]["ehz3"];
            this.form.eqd1 = this.form.detailList[1]["eqd1"];
            this.form.eqd2 = this.form.detailList[1]["eqd2"];
            this.form.eqd3 = this.form.detailList[1]["eqd3"];
            this.form.epjqd = this.form.detailList[1]["epjqd1"];
          }
        } else {
          this.form.detailList[i]["epjqd1"] = null;
        }
        Bus.$emit("setphbbgform", this.form);
      }
    },

    getyaq(e) {
      const area = 4998.49;
      return decimal.divide(decimal.multiply(1000, parseFloat(e)), area, 1);
    },
    // 获取详情
    getInfo() {
      if (!this.excelId) {
        return;
      }
      getSjPhbsjsyjcjlBsInfo(this.excelId).then((response) => {
        this.form = response.data;
        this.oneData = this.form.detailList[0];
        this.twoData = this.form.detailList[1];
        this.threeData = this.form.detailList[2];
      });
    },

    submitForm() {
      this.form.detailList = [];
      this.form.detailList.push(this.oneData);
      this.form.detailList.push(this.twoData);
      this.form.detailList.push(this.threeData);
      return this.form;
    },
    // 给报告传值
    setShajphebBgData() {
      Bus.$emit("setShajphebBgData", this.submitForm());
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
      if (!info || !info.label) {
        return;
      }
      if (!this.form.pandyj) {
        this.form.pandyj = info.label;
      } else {
        if (info && info.label) {
          this.form.pandyj += "、" + info.label;
        }
      }
      // 添加指标 info.list
      let keys = [];
      info.list.forEach((item) => {
       if (this.form.baDetailVos[item.refQualId] && this.form.baDetailVos[item.refQualId].jiancjg) {
          this.form.baDetailVos[item.refQualId].symbolValue = item.symbolValue;
          this.form.baDetailVos[item.refQualId].num1 = item.num1;
          this.form.baDetailVos[item.refQualId].num2 = item.num2;
          keys.push(item.refQualId);
        }
      });
      this.computeDetectionResult(keys);
    },
    // 计算检测结果
    computeDetectionResult(keys) {
      if (!keys || keys.length <= 0) {
        return;
      }
      const data = keys.map((key) => {
        const info = {
          ...this.form.baDetailVos[key],
          jiancjg: this.form.baDetailVos[key].jiancjg == "-" ? "" : this.form.baDetailVos[key].jiancjg
        };
        return info;
      });
      computeBiQualification(data).then((res) => {
        const returnData = res.data;
        returnData.forEach((item) => {
          if (!item.symbolValue && !item.num1 && !item.num2) {
            item.jiszb = "-";
          }
          item.jiancjg = item.jiancjg ? item.jiancjg : "-";
          this.form.baDetailVos[item.qualId] = item;
        });
      });
    },
    // 获取检测结论
    getJcjl() {
      const form = JSON.parse(JSON.stringify(this.form));
      queryJcjl(emptyConvert(form)).then((res) => {
        const info = res.data;
        this.form.jiancjl = info.jiancjl;
      });
    },
    // 编辑单个技术指标后赋值
    selectJudgeBaseEdit(info) {
      if (info.qualId) {
        this.form.baDetailVos[info.qualId] = info;
      }
      this.computeDetectionResult([info.qualId]);
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      // this.$set(this.form, 'jiancyj', info.label);
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setSjBgJiancyj", { jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds });
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setSjBgZhuyyqsbmcjbh", { zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds });
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },

    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    },
    handleKeyDown(event, rowIndex, colIndex) {
      const maxArr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    }
  },
  data() {
    return {
      formatText: "HH:mm",
      jiassj1: undefined,
      jiassj2: undefined,
      ningjsj1: undefined,
      ningjsj2: undefined,
      ningjsjpj: undefined,
      jilbh: "",
      form: {
        detailList: [
          { sqd1: "", shz1: "", shz2: "", sqd2: "", shz3: "", sqd3: "", eqd1: "", ehz1: "", ehz2: "", eqd2: "", ehz3: "", eqd3: "", qqd1: "", qhz1: "", qhz2: "", qqd2: "", qhz3: "", qqd3: "" },
          { sqd1: "", shz1: "", shz2: "", sqd2: "", shz3: "", sqd3: "", eqd1: "", ehz1: "", ehz2: "", eqd2: "", ehz3: "", eqd3: "", qqd1: "", qhz1: "", qhz2: "", qqd2: "", qhz3: "", qqd3: "" },
          { sqd1: "", shz1: "", shz2: "", sqd2: "", shz3: "", sqd3: "", eqd1: "", ehz1: "", ehz2: "", eqd2: "", ehz3: "", eqd3: "", qqd1: "", qhz1: "", qhz2: "", qqd2: "", qhz3: "", qqd3: "" }
        ],
        shiyrq: "2024年03月09日",
        gongcbwyt: "",
        baogbh: "",
        jiancdwmc: "山东路桥集团试验检测中心有限公司泰安高速公路施工总承包项目工地试验室",
        totalPage: "",
        page: "",
        jiancyj: "",
        zhuyyqsbmcjbh: "",
        gongcmc: "汾阳至石楼高速公路",
        yangpmc: "K39+820-K40+440原地面",
        yangpbh: "JTG/T 3610-2019",
        laiysj: "2022年03月09日",
        yangpsl: "3kg",
        yangpzt: "完好无损"
      },
      oneData: {},
      twoData: {},
      threeData: {},
      twoTableData: {},
      threeTableData: {},
      fjsm: "附加声明：",
      dateText: "2024年05月10日",
      readonly: false
    };
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    syType: {
      type: [String, Number],
      default: () => ""
    }
  },
  watch: {},
  created() {
    this.getInfo();
  }
};
</script>

<style scoped lang="scss">
.mt20 {
  margin-top: 20px !important;
}
</style>
